<section class="section">
  <div class="section-body">
    <div class="row">
      <div class="col-12 col-md-6 col-lg-12">
        <div class="card">
          <div
            class="card-header d-flex justify-content-between align-items-center"
          >
            <h4 class="m-0">企业管理</h4>
            <div class="d-flex align-items-center">
              <div class="input-group mr-2" style="width: 600px">
                <select
                  class="form-control"
                  id="searchType"
                  style="width: 50px"
                >
                  <option value="id">企业ID</option>
                  <option value="name">企业名称</option>
                  <option value="email">企业邮箱</option>
                </select>
                <input
                  type="text"
                  class="form-control"
                  placeholder="输入搜索内容"
                  id="searchInput"
                />
                <div class="input-group-append">
                  <button class="btn btn-primary" type="button" id="searchBtn">
                    <i class="fas fa-search"></i> 查询
                  </button>
                </div>
                <button class="btn btn-primary" id="addCompanyBtn">
                  <i class="fas fa-plus"></i> 新增
                </button>
                <button
                  class="btn btn-danger ml-2"
                  id="batchDeleteBtn"
                  disabled
                >
                  <i class="fas fa-trash"></i> 批量删除
                </button>
              </div>
            </div>
          </div>
          <div class="card-body p-0">
            <div class="table-responsive">
              <table class="table table-striped table-md">
                <thead>
                  <tr>
                    <th>
                      <div class="custom-checkbox custom-control">
                        <input
                          type="checkbox"
                          class="custom-control-input"
                          id="selectAll"
                        />
                        <label
                          for="selectAll"
                          class="custom-control-label"
                        ></label>
                      </div>
                    </th>
                    <th>企业ID</th>
                    <th>企业名称</th>
                    <th>联系人</th>
                    <th>企业邮箱</th>
                    <th>联系电话</th>
                    <th>企业地址</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody id="companyTableBody"></tbody>
              </table>
            </div>
          </div>
          <div class="card-footer text-right">
            <nav class="d-inline-block">
              <ul class="pagination mb-0" id="pagination"></ul>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- 企业表单模态框 -->
  <div class="modal fade" id="companyModal" tabindex="-1">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">企业表单</h5>
          <button type="button" class="close" id="modalClose">
            <span>&times;</span>
          </button>
        </div>
        <form id="companyForm">
          <div class="modal-body">
            <input type="hidden" id="companyId" />
            <div class="form-group">
              <label>企业名称</label>
              <input
                type="text"
                class="form-control"
                id="enterpriseName"
                required
              />
            </div>
            <div class="form-group">
              <label>联系人</label>
              <input
                type="text"
                class="form-control"
                id="contactPerson"
                required
              />
            </div>
            <div class="form-group">
              <label>企业邮箱</label>
              <input
                type="email"
                class="form-control"
                id="enterpriseEmail"
                required
              />
            </div>
            <div class="form-group">
              <label>联系电话</label>
              <input
                type="tel"
                class="form-control"
                id="phoneNumber"
                required
              />
            </div>
            <div class="form-group">
              <label>企业地址</label>
              <input
                type="text"
                class="form-control"
                id="enterpriseAddress"
                required
              />
            </div>
          </div>
          <div class="modal-footer">
            <button
              type="button"
              class="btn btn-secondary"
              data-dismiss="modal"
            >
              关闭
            </button>
            <button type="submit" class="btn btn-primary">保存</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</section>
